/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			propbase.h
  \date			Oct 2012
  \author		TNick

  \brief		Contains the definition for PropBase class


*//*


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read COPYING and README files in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __PROPBASE_INC__
#define __PROPBASE_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	<cpg/cpg.h>
#include	<memtrack.h>
#include	<cpg/properties/props.h>
#include	<cpg/properties/iprop.h>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */



/**
*	@brief	Class describing a property
*/
class PropBase		: public MemTrack		{
	BBM_TRACK( PropBase );

	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:

	/**
	*	@brief	the name of this property
	*/
	QString					s_name_;


	/**
	*	@brief	the unique id of the property
	*/
	int						index_;


	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */


private:


	/**
	*	@brief	constructor;
	*/
	PropBase			( void )
	{}


protected:


	/**
	*	@brief	creates a property with given name and id
	*/
	PropBase			( const QString & s_name, int id  )
	{
		s_name_ = s_name;
		index_ = id;
	}


public:


	/**
	*	@brief	destructor;
	*/
	virtual				~PropBase					( void );

	/**
	*	@brief	the name for this property
	*/
	inline QString		name						( void ) const
	{ return s_name_; }


	/**
	*	@brief	the index inside Props of this property
	*/
	inline int			myIndex						( void ) const
	{ return index_; }




	/* ******************************************************************* */
	/** @name 	Methods that are required from implementing classes        */
	/* ******************************************************************* */
	///@{


	/**
	*	@brief	indicates base type for this property
	*/
	virtual Props::Types	myType						( void ) const = 0;


	/**
	*	@brief	return the value of a property in given IProp as a string
	*/
	virtual QString			asString					(
			const IProp *		inst,
			PropIndex			idx
			) const = 0;


	///@}
	/* ******************************************************************* */



	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class PropBase	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __PROPBASE_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
